import request from '@/utils/request'

// 查询积分记录列表
export function listMemberPointsLog(query) {
  return request({
    url: '/member/points/log/list',
    method: 'get',
    params: query
  })
}

// 查询积分记录详细
export function getMemberPointsLog(logId) {
  return request({
    url: '/member/points/log/' + logId,
    method: 'get'
  })
}

// 新增积分记录
export function addMemberPointsLog(data) {
  return request({
    url: '/member/points/log',
    method: 'post',
    data: data
  })
}

// 修改积分记录
export function updateMemberPointsLog(data) {
  return request({
    url: '/member/points/log',
    method: 'put',
    data: data
  })
}

// 删除积分记录
export function delMemberPointsLog(logId) {
  return request({
    url: '/member/points/log/' + logId,
    method: 'delete'
  })
}

// 导出积分记录
export function exportMemberPointsLog(query) {
  return request({
    url: '/member/points/log/export',
    method: 'get',
    params: query
  })
}

// 清空会员积分记录
export function cleanMemberPointsLog(memberId) {
  return request({
    url: '/member/points/log/clean/' + memberId,
    method: 'delete'
  })
} 